//
//  MyStoreController.m
//  LoveFreshBeen
//
//  Created by 魏根 on 2016/10/21.
//  Copyright © 2016年 魏根. All rights reserved.
//

#import "MyStoreController.h"
#import "MyStoreNotice.h"

@interface MyStoreController ()

@end

@implementation MyStoreController

- (void)viewDidLoad {
    [super viewDidLoad];
    MyStoreNotice* myStoreNotice = [[[NSBundle mainBundle] loadNibNamed:@"MyStoreNotice" owner:nil options:nil] lastObject];
   ;
    [self.view addSubview:myStoreNotice];
    myStoreNotice.frame = self.view.bounds;
    self.title = @"我的店铺";
}


- (void)viewWillAppear:(BOOL)animated{
    [super viewDidAppear:animated];
    [self.navigationController setNavigationBarHidden:NO];
    [self.tabBarController.tabBar setHidden:YES];
    [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@""] forBarMetrics:UIBarMetricsDefault];
    
        UIBarButtonItem *back = [[UIBarButtonItem alloc]initWithImage:[[UIImage imageNamed:@"v2_goback"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStylePlain target:self action:@selector(backTo)];
    
    self.navigationController.navigationBar.translucent = false;
    
        self.navigationItem.leftBarButtonItem = back;
}

- (void)backTo{
    
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)viewDidDisappear:(BOOL)animated{
    [super viewDidDisappear:animated];
    [self.navigationController setNavigationBarHidden:YES];
    [self.tabBarController.tabBar setHidden:NO];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
